package BusinessLogic;

import Data.permissionData;
import Data.UserData;

public class LoginController implements ILoginController {
	
	private LoginModel ilm;
	
	public LoginModel getILoginModel(){
		return ilm;
	}
    
	public void setLoginModel(LoginModel iLm){
		ilm=iLm;
	}
	
	public LoginController(){
		ilm=new LoginModel();
	}
	
	@Override
	public UserData getUserInformationControl(int userID) {
		return ilm.getUserInformation(userID);
	}

	@Override
	public String searchUserInformationByIDControl(int userID) {
		return ilm.searchUserInformationByID(userID);
	}


	@Override
	public permissionData getPermissionInformationControl(int userID) {
		return ilm.getPermissionInformation(userID);
	}

	@Override
	public String getUserNameByIDControl(int userID) {
	    return ilm.getUserNameByID(userID);
	}

	@Override
	public String getUserPasswordByIDControl(int userID) {
		return ilm.getUserPasswordByID(userID);
	}

	@Override
	public int getUserPermissionByIDControl(int userID) {
		return ilm.getUserPermissionByID(userID);
	}

	@Override
	public int loginControl(int userID, String i, int permission) {
	    return ilm.login(userID, i, permission);
	}

	@Override
	public String searchPermissionInformationByIDControl(int userID) {
		return ilm.searchPermissionInformaionByID(userID);
	}
	//

}
